package com.example.dbsample.model.enums;

import com.example.dbsample.model.bo.ErrorCode;

public enum CommonErrorCodeEnum implements ErrorCode {
    SYSTEM_ERROR("500000", "系统错误"),
    SYSTEM_RUNTIME_ERROR("400000", "应用错误"),
    SENTINEL_BLOCK_ERROR("450000", "流量控制"),
    SENTINEL_SYSTEM_DEGRADE_ERROR("450001", "降级规则"),
    SENTINEL_SYSTEM_FLOW_ERROR("450002", "流量规则"),
    SENTINEL_SYSTEM_AUTHORITY_ERROR("450003", "授权规则"),
    SENTINEL_SYSTEM_BLOCK_ERROR("450004", "系统规则"),
    SENTINEL_PARAM_FLOW_ERROR("450005", "热点流控"),
    PARAM_ERROR("460000", "参数错误"),
    SUCCESS("000000", "success"),
    ;

    private final String msg;
    private final String code;

    private CommonErrorCodeEnum(String code, String msg) {
        this.msg = msg;
        this.code = code;
    }


    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }
}
